#!/bin/bash

set -e

tar -xzvf kuasar-v1.0.0-vendor.tar.gz
tar -xzvf vendor.tar.gz
cp -rf ./kuasar-v1.0.0-vendor/* ./
cat ./series.conf | while read line
do
    if [[ $line == '' || $line =~ ^\s*# ]]; then
        continue
    fi
    echo "====patch $line======"
    patch -p1 -F1 -s < ./patch/$line
done
